package com.adley.dubbo.controller;

import com.adley.dubbo.inter.IItemService;
import com.adley.dubbo.pojo.Item;
import com.adley.dubbo.pojo.query.ItemQuery;
import com.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping(value="/item")
public class ItemController {
    @Reference(version = "${service.version}")
    private IItemService iItemService;

    @GetMapping(path = "/list")
    public List<Item> queryItems() {return iItemService.queryItemList(new ItemQuery());}
}